#include <stdio.h>
int main()
{
    char ch = 0;
    scanf("%c", &ch);
    if(ch >= 'a'&&ch <= 'z')
    ch = ch - 32;
    else if(ch >= 'A'&&ch <= 'Z')
    ch = ch + 32;
    else
    ch = ch;
    printf("%c", ch);
    return 0;
}